physics_particle_delete_region_box

Delete all particles from a rectangular area within the physics simulation.

语法:

physics_particle_delete_region_box(x, y, halfWidth, halfHeight)


参数 描述
x The x position of the center of the area to delete.
y The y position of the center of the area to delete.
halfWidth The half width of the rectangle.
halfHeight The half height of the rectangle.


返回: N/A(无返回值)


描述

With this function you can delete (remove) all the particles that fall within the bounds of the defined rectangular area from the physics simulation in the current room. The function takes the x and y position for the center of the area to delete as well as the half width and height of the rectangle (in pixels) which defines the area.


例如:

physics_particle_delete_region_box(mouse_x, mouse_y, 32, 32);

The above code will delete all particles found in a rectangular area around the mouse position.


上一页: Soft Body Particles
下一页: physics_particle_delete_region_poly
© Copyright YoYo Games Ltd. 2018 All Rights Reserved